<script setup lang="ts">
import { computed } from "vue";
import { useRouter } from "vue-router";

const router = useRouter();

const text = computed(() => localStorage.getItem("text"));

const onClickLeft = () => {
  router.back();
};
</script>

<template>
  <van-nav-bar
    title="文章预览"
    left-text="返回"
    left-arrow
    @click-left="onClickLeft"
  />

  <v-md-preview :text="text"></v-md-preview>
</template>
